/*
 *
 */
package org.opu.translator;

/**
 *  Token in string
 * @author yura
 */
public class Token {

    /** token name */
    public final String name;
    /** token start position */
    public final int startPos;
    /** token end position */
    public final int endPos;

    /**
     *
     * @param name token name
     * @param startPos token start position
     * @param endPos token end position
     */
    Token(String name, int startPos, int endPos) {
        this.name = name;
        this.startPos = startPos;
        this.endPos = endPos;
    }

    @Override
    public String toString() {
        return String.format("Token [%2d, %2d, %s]", startPos, endPos, name);
    }
}
